public class Main {
    public static void Fly(ICanFly canFly){
        canFly.fly();
    }
    public static void Walk(ICanRun canRun){
        canRun.run();
    }
    public static void Swim(ICanSwim canSwim){
        canSwim.swim();
    }

    public static void main(String[] args) {
        Dog dog = new Dog("斯派克",4);
        Bird bird = new Bird("金丝雀",1);
        Duck duck = new Duck("小黄鸭",1);
        Walk(duck);
        Walk(dog);
        System.out.println("===========");
        Swim(duck);
        Swim(dog);
        System.out.println("============");
        Fly(bird);
        Fly(duck);
    }
}
